Optimal Search Trees with 2-Way Comparisons

نویسندگان

  • Marek Chrobak
  • Mordecai J. Golin
  • J. Ian Munro
  • Neal E. Young
چکیده

We study the following problem: given a set of keys and access probabilities, find a minimum-cost binary search tree that uses only 2-way comparisons (=, <,≤) at each node. We give the first polynomialtime algorithm when both successful and unsuccessful queries are allowed, settling a long-standing open question. Our algorithm relies on a new structural theorem that proves a conjecture of Spuler [13,14]. We also give a fast approximation algorithm, improved algorithms for special cases, and a counter-example revealing an error in previous works. 1 Background and statement of results We study the problem of finding optimal binary search trees using 2-way comparisons. Given a set K of keys and a query set Q from an ordered universe, and a set C ⊆ {=, <,≤} of binary operators, a (2-way comparison) binary search tree (2wcst) is a rooted binary tree where each internal node has a key in K and an associated operator in C. Given a query value v ∈ Q, a search for v compares v to the key at the root using the root’s comparison operator. If the outcome is yes, the search recurses into the left subtree, otherwise into the right subtree. The search halts when it reaches a leaf. For any v ∈ Q, the outcomes of the comparisons made during the search must suffice to determine the relation of v to every key in K. Fig. 1 gives two examples. v = H? v < O? v < W? yes

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Optimal search trees with equality tests

We study the following problem: given a set of keys and access probabilities, find a minimum-cost binary search tree that uses only 2-way comparisons (=, <,≤) at each node. We give the first polynomialtime algorithm when both successful and unsuccessful queries are allowed, settling a long-standing open question. Our algorithm relies on a new structural theorem that proves a conjecture of Spule...

متن کامل

A Best Possible Bound for the Weighted Path Length of Binary Search Trees

The weighted path length of optimum binary search trees is bounded above by Y'./3i + 2 a. + H where H is the entropy of the frequency distribution, /3i is the total weight of the internal nodes, and aj is the total weight of the leaves. This bound is best possible. A linear time algorithm for constructing nearly optimal trees is described. One of the popular methods for retrieving information b...

متن کامل

2-Way vs. d-Way Branching for CSP

Most CSP algorithms are based on refinements and extensions of backtracking, and employ one of two simple “branching schemes”: 2-way branching or d-way branching, for domain size d. The schemes are not equivalent, but little is known about their relative power. Here we compare them in terms of how efficiently they can refute an unsatisfiable instance with optimal branching choices, by studying ...

متن کامل

An Evaluation of Self-adjusting Binary Search Tree Techniques

Much has been said in praise of self-adjusting data structures, particularly self-adjusting binary search trees. Self-adjusting trees are most suited to skewed key-access distributions as the techniques attempt to place the most commonly accessed keys near the root of the tree. Theoretical bounds on worst-case and amortized performance (i.e. performance over a sequence of operations) have been ...

متن کامل

Optimal Self-healing of Smart Distribution Grids Based on Spanning Trees to Improve System Reliability

In this paper, a self-healing approach for smart distribution network is presented based on Graph theory and cut sets. In the proposed Graph theory based approach, the upstream grid and all the existing microgrids are modeled as a common node after fault occurrence. Thereafter, the maneuvering lines which are in the cut sets are selected as the recovery path for alternatives networks by making ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015